﻿@model eduscrum.ViewModels.SprintVM
@using eduscrum.ViewModels;

<div id="tbl_createSprint">
    <h2>&nbsp;</h2>
    <table>
    @using (Html.BeginForm("Create", "Sprint", FormMethod.Post, new { name = "createSprint", onsubmit = "selectAll(this['sprintbackloglistcreate']);" }))
    {
        @Html.ValidationSummary(true)
        @Html.Hidden("projectID", Model.Project.ProjectID.ToString())
        @Html.Hidden("projectStartDate", Model.Project.StartDate.ToString())
        @Html.Hidden("projectEndDate", Model.Project.EndDate.ToString())
        <tr>
            <td class="editor-label">
                @Html.LabelFor(model => model.StartDate)
            </td>
            <td class="editor-field">
                @Html.TextBoxFor(model => model.StartDate, new { @id = "datepickerSprintStart", @Value = Model.StartDate.ToString("dd-MM-yyyy"), @readonly = "readonly" })
                @Html.ValidationMessageFor(model => model.StartDate)
            </td>
        </tr>
        <tr>
            <td class="editor-label">
                @Html.LabelFor(model => model.EndDate)
            </td>
            <td class="editor-field">
                @Html.TextBoxFor(model => model.EndDate, new { @id = "datepickerSprintEnd", @Value = Model.EndDate.ToString("dd-MM-yyyy"), @readonly = "readonly" })
                @Html.ValidationMessageFor(model => model.EndDate)
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <h3>Sprint Backlog</h3>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <select id="sprintbackloglistcreate" name="sprintbackloglistcreate" size="10" multiple="multiple">
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <input type="image" src="@Url.Content("~/images/add.png")" alt="Add" title="Add" />
            </td>
        </tr>
    }
    </table>
</div>